<template>
  <div>
    <el-input :value="value" @input="onInput"></el-input>
  </div>
</template>

<script>
import {makePinyin} from "@/js/pinyin.js";
export default {
  props:["value"],
  methods: {
    onInput(text) {
      let pinyin = makePinyin(text);
      this.$emit("input", pinyin);
    }
  }
}
</script>